package com.xiongwei.springcloud.service;

import com.xiongwei.springcloud.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author XiongWei
 * @date 2021/8/22
 */
@FeignClient(value="SPRINGCLOUD-PROVIDER-DEPT", fallbackFactory = DeptClientServiceFailbackFactory.class)
public interface DeptClientService {

    @GetMapping("/dept/list")
    public List<Dept> queryAll();

    @GetMapping("/dept/get/{id}")
    public Dept get(@PathVariable("id") Long id);
}
